package main

import "fmt"

// string and slice diff
func main() {

	str := "hello goLang"

	slice := str[:5]

	//字符串是不可变的
	//slice[0]="A"

	fmt.Println(slice)

	//不可以处理中文
	//arr1:=[]byte(slice)
	//支持中文字符
	arr1 := []rune(slice)

	arr1[0] = '中'
	str = string(arr1)

	fmt.Println(str)
	fmt.Println(slice)

}
